#ifndef __BTL_FINGERPRINT_ALGORITHM_H__
#define __BTL_FINGERPRINT_ALGORITHM_H__
#include "btl_config.h"
#include "fp_template.h"

typedef struct BTL_PROCESS_PRE {
    int NumFingers;
    int AcceptedNum;  //记录录入次数
    int Islands;
    int MatchIndex;  //匹配成功的序列号

} WORK_STRUCTURE;

WORK_STRUCTURE* fp_work_info(void);

typedef struct SENSOR_OPT {
    unsigned char MaxEnrollTimes;

    unsigned char expected_id; /* 上层决定录入第几次：从1开始 */
    unsigned char accepted_id;

    /* 传图使用 */
    unsigned int last_frame_index;
    unsigned int last_frame_size;
    unsigned int image_offset;
} FP_OPT;

FP_OPT* fp_option_info(void);

void fp_algorithm_init(void);

void fp_capture(unsigned char cmd1, unsigned char* data, unsigned int size, unsigned short index);
void fp_enroll(unsigned char cmd1, unsigned char* data, unsigned int size);
void fp_identify(unsigned char cmd1, unsigned char* data, unsigned int size);
void fp_remove(unsigned char cmd1, unsigned char* data, unsigned int size);
void fp_enumerate(void);
void fp_detect(void);
void fp_idle(void);

void fp_recovery_factory(void);

#endif  // __BTL_FINGERPRINT_ALGORITHM_H__
